<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>{$Think.lang.project_title}</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="INDEX/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="INDEX/css/main.css"/>.
		<link rel="stylesheet" type="text/css" href="INDEX/css/login.css"/>
	</head>

	<body>
		<script src="INDEX/js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init()
		</script>
		<header class="mui-bar mui-bar-nav">
			<!--<a class="mui-switch "></a>-->
			<div class="mui-switch mui-pull-right mui-active">
  				<div class="mui-switch-handle"></div>
			</div>
			<h1 class="mui-title">{$Think.lang.project_title}</h1>
		</header>
		<div class="change_pwd_content">
			<div class="change_pwd_title" style="padding-top:44px ;">
				<h2>{$Think.lang.project_title}</h2>
			</div>
			<div class="change_pwd_user">
				<div class="user_name">
					<span class="user_pwd_img"></span>
					<input type="password" placeholder="{$Think.lang.forget_new_pass}" id="password"/>
				</div>
				<div class="user_pwd">
					<span class="user_pwd_img"></span>
					<input type="password" placeholder="{$Think.lang.forget_pass}" id="newpassword"/>
				</div>
			</div>
			<div class="change_pwd_now">{$Think.lang.forget_edit}</div>
			<a href="{:Url('index/Login/login')}"><div class="forgot" style="color: #CBAB6F;">{$Think.lang.toLogin}</div></a> 
			<input type="hidden" value="{$user_id}" name="user_id" id="user_id">
		</div>
	</body>
	<script src="INDEX/js/jquery-1.8.0.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(document).ready(function(){
//		$(window).height() //浏览器当前窗口可视区域高度
		var width=$(document).width();
		var height=$(window).height();
		$(".change_pwd_content").css({"background":"url(INDEX/images/img/img_sign_in_bg.png) center no-repeat","width":width,"height":height,"background-size":"cover"})
		})
		//提交
		$(".change_pwd_now").click(function(){
			var password = $("#password").val();
			var newpassword = $("#newpassword").val();
			var user_id = $("#user_id").val();
			if(password == "")
			{
				mui.toast("{$Think.lang.empty_password}");
				return false;
			}
			if(newpassword == "")
			{
				mui.toast("{$Think.lang.forget_empty_newpassword}");
				return false;
			}
			$.post("{:Url('Login/forget1')}", {
                "password" : password,
                "newpassword" : newpassword,
				"user_id" : user_id
            }, function(data) {
                if (data['status'] > 0) {
                    //$(".sub_login").attr("disabled", "disabled");
					mui.toast(data["msg"]);
                    window.location.href = "{:Url('Login/login')}";
                } else {
                    mui.toast(data["msg"])
                }
            });
		})
	</script>
</html>